function testPrint(flag, pix) {
    if (flag) {
        console.log(pix, " 测试成功...")
    } else {
        console.log(pix, " 测试失败...")
    }
}

// 8-9 = -1
// -1
let re = numberAdd('8', '-9');
let flag = re == "-1";
testPrint(re, "8-9=-1");


// 10-9 =1
// - 9
// - 9 + 1 * 10 - 0 * 10
re = numberAdd('10', '-9');
flag = re == "1";
testPrint(re, "10-9=1");

// 100-9 =91
// -9
// - 9 + 0 * 10 - 0 - 10
re = numberAdd('100', '-9');
flag = re == "91";
testPrint(re, "100-9=91");

// 18-9 = 9
// -1
// - 1 + 1 * 10 - 0 * 10
re = numberAdd('18', '-9');
flag = re == "9";
testPrint(re, "18-9=9");

// 108-9
re = numberAdd('108', '-9');
flag = re == "99";
testPrint(re, "108-9=99");

// 1000-9
re = numberAdd('1000', '-9');
flag = re == "991";
testPrint(re, "1000-9=991");

// -9-9
re = numberAdd('-9', '-9');
flag = re == "-18";
testPrint(re, "-9-9=-18");

// 1009-1
re = numberAdd('1009', '-1');
flag = re == "1008";
testPrint(re, "1009-1=1008");


re = numberAdd('2006', '-8');
flag = re == "1998";
testPrint(re, "2006-8=1998");


re = numberAdd('2006.4', '-8.3');
flag = re == "1998.1";
testPrint(re, "2006.4-8.3=1998.1");

re = numberAdd('2006.4', '-8.5');
flag = re == "1997.9";
testPrint(re, "2006.4-8.5=1997.9");

re = numberAdd('1006.4', '-8.5');
flag = re == "997.9";
testPrint(re, "1006.4-8.5=997.9");



console.log("测试数字数据输出========")
let result = number2digit('0');
console.log(result)
result = number2digit('8');
console.log(result)
result = number2digit('10');
console.log(result)
result = number2digit('11');
console.log(result)
result = number2digit('21');
console.log(result)
result = number2digit('101');
console.log(result)
result = number2digit('191');
console.log(result)
result = number2digit('110');
console.log(result)
result = number2digit('1111111111');
console.log(result)
console.log("测试数字数据输出========")